#include <iostream>
using namespace std;

int Solve(int n, int m, int k) {
  int ll = 1, rr = m;

  while (ll < rr) {
    int mm = ((ll + rr) >> 1) + 1;

    long long need;
    int len;

    len = min(mm, k);  //[1..k]
    need = k - len + (long long)(mm + mm - len + 1) * len / 2;

    len = min(mm - 1, n - k);  //[k+1...n]
    need += (n - k) - len + (long long)len * (mm - 1 + (mm - 1 - len + 1)) / 2;
    if (need <= m) {
      ll = mm;
    } else {
      rr = mm - 1;
    }
  }
  return ll;
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  cout << Solve(n, m, k) << "\n";
  return 0;
}